package com.alameda.facade.file;

import com.alameda.danmaku.api.ApVideoDanmakuProvider;
import com.alameda.media.api.AdMediaProvider;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

/**
 * 文件 接入层
 *
 * @author Lv
 * @date 2024/11/24
 */
@Component
public class MediaFileFacade {

    @DubboReference
    private AdMediaProvider adMediaProvider;

    /**
     * 物理层面移除已逻辑删除文件
     *
     * @return
     */
    public Boolean removeLogicDeletedFile() {
        return adMediaProvider.removeLogicDeletedFile();
    }

    @DubboReference
    private ApVideoDanmakuProvider apVideoDanmakuProvider;

    /**
     * 物理层面删除已逻辑删除超过七天的视频弹幕
     */
    public Boolean removeLogicDeletedFileDanmaku() {
        return apVideoDanmakuProvider.removeLogicDeletedFileDanmaku();
    }
}
